package com.biz.primus.commodity.vo.backend;


import com.biz.primus.commodity.enums.UsageScenarios;
import com.biz.primus.base.vo.ExtendProductVo;
import com.biz.primus.common.utils.JsonUtil;
import lombok.Data;
import org.apache.commons.collections.CollectionUtils;

import java.io.Serializable;
import java.util.List;

/**
 * @author 江南
 * @usage
 * @reviewer
 * @since 2017/3/21
 */
@Data
public class UpdateTypeBProductVo implements Serializable {

	private static final long serialVersionUID = 8746155401499865913L;

	private Long productId;

    private String productCode;

    private Long brandId;

    private String breif;

    private Long categoryId;

    private String i18nCode;

    private String image;

    private List<String> productImages;

    private List<String> introImages;

    private String productName;

    private String seoDescription;

    private String seoKeywords;

    private String seoTitle;

    private String subTitle;

    private Long vendorId;

    private List<Long> saleTags;

    private List<Long> keywords;

    /**
     * 配置
     */
    private String configure;

    /**
     * 使用场景
     */
    private UsageScenarios scene;

    /** 库存提示值 */
    private Integer promptStock;
    /**
     * 是否包邮(快喝)
     */
    private Boolean isKuaihePackageMail;

    /**
     * 虚拟销量
     */
    private Integer virtualSalesVolume;

    /**
     * 库存渠道
     */
    private String stockChannel;

    /**
     * 商品扩展属性
     */
    private List<ExtendProductVo> extendProductVos;

    public String getExtendProductString(){
        if (CollectionUtils.isNotEmpty(extendProductVos)){
            return JsonUtil.obj2Json(extendProductVos);
        }
        return "";
    }

}
